package cn.lg.soar.core.manager;

import cn.lg.soar.core.propertie.security.PathPattern;

/**
 * 权限级别管理器
 * @author luguoxiang
 * @date 2022/4/4
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public class SoarPermitLevelManager extends PermitLevelManager{

    public final static int ANON = 0;
    public final static int AUTH = 1;
    public final static int LOGIN = 2;

    /**
     * 更新权限级别
     * @param pathPattern
     */
    public void update(PathPattern pathPattern) {
        putLevel(ANON, pathPattern.getAnon());
        putLevel(AUTH, pathPattern.getAuth());
        putLevel(LOGIN, pathPattern.getLogin());
    }

}
